//
//  KeyMapper.cpp
//  Dictionary
//
//  Created by Rune Laugesen on 27/01/12.
//  Copyright 2012 Copenhagen University. All rights reserved.
//

#include <sstream>
#include "KeyMapper.h"

using namespace std;

void KeyMapper::BuildDictionary(Instances trainingdata)
{
    for (map<string, Instance>::iterator it = trainingdata.instances.begin(); it != trainingdata.instances.end(); it++)
    {
        string word = (*it).first;
        _dictionary.push_back(word);
    }
}

void KeyMapper::BuildDictionary(map<string, vector<string> > featuredata)
{
    for (map<string, vector<string> >::iterator it = featuredata.begin(); it != featuredata.end(); it++)
    {
        string word = (*it).first;
        _dictionary.push_back(word);
    }
}
